<template>
  <span>{{ dimension }}</span>
</template>
<script>
import { getDimensionDoc } from '@/api/dimension'

export default {
  data() {
    return { dimension: null }
  },
  beforeMount() {
    getDimensionDoc(this.params.value)
      .then(response => {
        if (response.Result === 0 && response.Data) {
          this.dimension = response.Data.Name
        } else {
          this.dimension = ''
        }
      })
      .catch(error => {
        console.log(error)
        this.dimension = ''
      })
  }
}
</script>
